#include "Timer.h"
#include <iostream>
#include "SDL/SDL.h"
uint32_t Timer::m_CurrentTime = 0;
float Timer::m_DeltaTime = 0.0f;

void Timer::CalcDeltaTime()
{
	//while (!SDL_TICKS_PASSED(SDL_GetTicks(), m_CurrentTime + 16));
	m_DeltaTime =(SDL_GetTicks()-m_CurrentTime)/1000.0f;
	m_CurrentTime=SDL_GetTicks();
	if (m_DeltaTime > 0.05f)
		m_DeltaTime = 0.05f;
}
